Skip to main content

Lens Desktop Proxy Proof of Concept Configuration Guide

With the release of Lens Desktop 2.1.1 for Windows, experimental support for proxy has been included. The functionality provided as a part of release 2.1.1 is NOT provided as a customer supported feature for production. It is provided only to validate the functionality and provide the ability to gather additional data such that a formal implementation in a future release that is supported can be provided for our customers.

The content in this documentation is provided only internal to HP employees and may not be distributed externally in whole or in part. This content may only be used to help in configuration and customers must be working with HP to deploy this functionality.

Brief

All Lens Desktop internet traffic can be redirected through an HTTP(s) proxy. This can be achieved in two ways:

  1. Per Component Configuration
  2. System-Wide Configuration (Windows only)

If a per-component proxy is configured, it overrides the system-wide configuration. Mix of these two approaches will also work. For example, configuring proxy for all user applications (Lens Desktop (Frontend) will use that configuration) and use component proxy setting for Lens Control Service.

In the examples below, a locally running mitmproxy is used with its default configuration (*:8080, SSL inspection turned on, no authorization). This allows all Lens Desktop (LD2) internet traffic to be sniffed and analyzed without interfering with LD2.

Note: With the default mitmproxy configuration, HTTPS WebSocket traffic will not work, which may block part of the Lens Control Service (LCS) traffic. This can be resolved by configuring mitmproxy or using alternative tools like Fiddler, which support this functionality out of the box.

Per Component Configuration

Two components of Lens Desktop use the network. Both must be configured separately:

Lens Desktop (Frontend)

  1. If SSL inspection is used, ensure that proxy certificate is added to Trusted Root Certification Authorities under Local Computer or Current User.
  2. Modify autostart and/or links to always start Lens Desktop with --proxyserver command line switch. Check here for details. Example:

Lens Control Service (LCS)

  1. If SSL inspection is used, ensure that proxy certificate is added to Trusted Root Certification Authorities under Local Computer.
  2. Create (or update) %ProgramFiles%\Poly\Lens Control Service\appsettings-Admin.json file with Proxy section. Similar section already exists in %ProgramFiles%\Poly\Lens Control Service\appsetting.json and can be used as reference. Note that modifications of %ProgramFiles%\Poly\Lens Control Service\appsetting.json are not supported. Example:
{
"Proxy": {
"ProxyServer": "127.0.0.1:8080",
"VerificationUrls": [
"https://lens.poly.com",
"https://api.silica-prod01.io.lens.poly.com"
]
}
}

System-Wide Configuration (Windows Only)

On Windows, you can configure a system-wide proxy that applies to all applications. However, note that if a per-component proxy is set, it will override the system-wide settings.

Steps to Configure:

  1. Open the Windows Settings app.
  2. Navigate to Network & Internet > Proxy.
  • Example:
  1. Modify the Windows Registry:
    • Navigate to: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVVersion\Internet Settings
    • Set the following registry entry:
      • Entry Name: ProxySettingsPerUser
      • Type: DWORD
      • Value: 0
  2. Copy two registry entries (easy way to copy registry key is to export it, modify .reg file and then import):
    • From: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections
    • To: KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections
  3. Create the following registry entries in: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings
    • ProxyEnable: REG_DWORD set to 1
    • ProxyServer: REG_SZ set to the proxy address (for our example it is 127.0.0.1:8080)
  4. Restart the LCS service and Lens Desktop application.